package com.ruoyi.citys.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 地区管理对象 t_city
 * 
 * @author ruoyi
 * @date 2024-10-12
 */
public class TCity extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 行政区划代码 */
    @Excel(name = "行政区划代码")
    private Long code;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 上级 id */
    @Excel(name = "上级 id")
    private Long pid;

    /** 类型:0=全部,1=省,2=市,3=地级市/区/县 */
    @Excel(name = "类型:0=全部,1=省,2=市,3=地级市/区/县")
    private String type;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setCode(Long code) 
    {
        this.code = code;
    }

    public Long getCode() 
    {
        return code;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setPid(Long pid) 
    {
        this.pid = pid;
    }

    public Long getPid() 
    {
        return pid;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("code", getCode())
            .append("name", getName())
            .append("pid", getPid())
            .append("type", getType())
            .toString();
    }
}
